import request from '@/utils/request'


/**上传外部链接  */
export function uploadLink(data) {
  return request({
    url: `/system/oss/uploadLink`,
    method: 'POST',
    data
  })
}

/**查询OSS对象存储列表  */
export function ossList(params) {
  return request({
    url: `/distribution/oss/list`,
    params
  })
}



/**查询OSS对象标签列表  */
export function ossTagList(params) {
  return request({
    url: `/distribution/tag/list`,
    params
  })
}




/**新增OSS对象标签  */
export function addOssTag(data) {
  return request({
    url: `/distribution/tag`,
    method: 'POST',
    data
  })
}


/**删除OSS对象标签  */
export function deleteOssTag(tagIds) {
  return request({
    url: `/distribution/tag/` + tagIds,
    method: 'DELETE',
  })
}



/**修改OSS对象标签  */
export function updateOssTag(data) {
  return request({
    url: `/distribution/tag`,
    method: 'PUT',
    data
  })
}



/**添加标签  */
export function bindTag(data) {
  return request({
    url: `/distribution/oss/bindTag?tagIds=${data.tagIds}&ossId=${data.ossId}`,
    method: 'PUT',
  })
}